<?php
	session_start();
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">

<head>

<meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1" />
<meta http-equiv="Content-Style-Type" content="text/css" />

<title>
HSE
</title>

<link rel="stylesheet" href="style.css" type="text/css" media="screen" />
<style type="text/css">
A{font-weight: bold; color:#000; text-align:bottom; font-family:'Times New Roman'; font-size:10pt; text-decoration:none; }
div.parent{visible:none;}
</style>
</head>

<body>

<div id="container">

	<!-- Start of Page Header -->

	<div id="page_header">

		<div id="page_heading">
		<h1><span></span></h1>
		<h2><span></span></h2>
		</div>

		<div id="page_headerlinks">
			<ul>
                <li> 
					<?php 
						if (isset($_SESSION['user_name'])) 
							echo $_SESSION['user_name']."</li><li class=\"last\"><a href=\"logout.php\">Log-out"; 
						else 
							echo "Guest</li><li class=\"last\"><a href=\"login.php\">Log-in"; 
					?></a></li>
			</ul>
		</div>
        <div id="change-pass">
			<ul>
            	<?php
					if (isset($_SESSION['user_name'])) 
						echo "<li class=\"belk\"><a href=\"change-password.php\">change password</a></li>";
				?>
            </ul>
		</div>


		<div class="clearthis">&nbsp;</div>

	</div>

	<!-- End of Page Header -->
<!-- Start of Left Sidebar -->

	<div id="left_sidebar">




		<!-- Start of Categories Box -->

		<div id="categories">
			<div id="categories_header">
			<h2>Categories</h2>
			</div>
        </div>
		<!-- start of categories tree -->
		
        <Script Language="JavaScript">
        <!--
        
        ///////////////////////////////////////////////////////////
        //www.fortochka.com
        //Alexander Babichev Copyright
        //this script is free for private use "as is"
        //under the condition:
        //the copyright notice should be left unchanged.
        ////////////////////////////////////////////////////////////
        var currentA = 'm0'
        
        function list(name,url){
            this.name = name
            this.url = url
           }
        
        var dir = new Array()
        
        //=============================================================
        
        var root = 'Health, Safety and Environment'
        
        var dir0 = new Array()
        var dir1 = new Array()
        var dir2 = new Array()
        
        dir[0] = "Environmental"
        dir0[0] = new list("Energy Conservation","kategori.php?id=1")
        dir0[1] = new list("Noise Management","kategori.php?id=2")
        dir0[2] = new list("Water Conservation","kategori.php?id=3")
        dir0[3] = new list("Contaminated Land","kategori.php?id=4")
        
        dir[1] = 'Community Health and Safety'
        dir1[0] = new list("Water Quality and Availability","kategori.php?id=5")
        dir1[1] = new list("Structural safety","kategori.php?id=6")
        dir1[2] = new list("Life and Fire Safety","kategori.php?id=7")
		dir1[2] = new list("Traffic Safety","kategori.php?id=8")
		dir1[2] = new list("Disease Prevention","kategori.php?id=9")
		dir1[2] = new list("Emergency Preparedness","kategori.php?id=10")
        
        dir[2] = 'Occupational Health and Safety'
        dir2[0] = new list("General Facility Operation","kategori.php?id=11")
        dir2[1] = new list("Communication and Training","kategori.php?id=12")
        dir2[2] = new list("Personal Protective Equipment","kategori.php?id=13")
        dir2[3] = new list("Monitoring","kategori.php?id=14")
        
        //=============================================================
        
        var folderImgArray = new Array()
        var treeImgArray = new Array()
        
        function precasheLeftSide(){
        for (var i = 0; i<=4; i++){
           folderImgArray[i] = new Image()
           treeImgArray[i] = new Image()   
        }
        
        folderImgArray[0].src = "LeftSide/folder.gif"
        folderImgArray[1].src = "LeftSide/openfolder.gif"
        treeImgArray[0].src = "LeftSide/Tplus.gif"
        treeImgArray[1].src = "LeftSide/Tminus.gif"
        treeImgArray[2].src = "LeftSide/Lplus.gif"
        treeImgArray[3].src = "LeftSide/Lminus.gif"
        }
        
        function writeSecondLevel(myArray,ii){
            for (kk=0;kk<myArray.length;kk++){
                if (kk==myArray.length-1){
                document.write("<nobr><img src='LeftSide/I.gif' align='absmiddle'><img src='LeftSide/L.gif' align='absmiddle'><a style='color:#222;' name='m" + ii + "n" + kk + "' id='m" + ii + "n" + kk + "' href='" + myArray[kk].url + "' Target='right' OnClick='this.blur(); changeColor(this.name); return true;'><img src='LeftSide/doclogo.png' align='absmiddle' border='0'>&nbsp;" + myArray[kk].name + "</nobr></a><br>")		
                }
                else{
                document.write("<nobr><img src='LeftSide/I.gif' align='absmiddle'><img src='LeftSide/T.gif' align='absmiddle'><a style='color:#222;' name='m" + ii + "n" + kk + "' id='m" + ii + "n" + kk + "' href='" + myArray[kk].url + "' Target='right' OnClick='this.blur(); changeColor(this.name); return true;'><img src='LeftSide/doclogo.png' align='absmiddle' border='0'>&nbsp;" + myArray[kk].name + "</nobr></a><br>")
                }
            }	
        }
        
        function writeLastSecondLevel(myArray,ii){
            for (kk=0;kk<myArray.length;kk++){
                if (kk==myArray.length-1){
                document.write("<nobr><img src='LeftSide/blank.gif' align='absmiddle'><img src='LeftSide/L.gif' align='absmiddle'><a style='color:#222;' name='m" + ii + "n" + kk + "' id='m" + ii + "n" + kk + "' href='" + myArray[kk].url + "' Target='right' OnClick='this.blur(); changeColor(this.name); return true;'><img src='LeftSide/doclogo.png' align='absmiddle' border='0'>&nbsp;" + myArray[kk].name + "</nobr></a><br>")		
                }
                else{
                document.write("<nobr><img src='LeftSide/blank.gif' align='absmiddle'><img src='LeftSide/T.gif' align='absmiddle'><a style='color:#222;' name='m" + ii + "n" + kk + "' id='m" + ii + "n" + kk + "' href='" + myArray[kk].url + "' Target='right' OnClick='this.blur(); changeColor(this.name); return true;'><img src='LeftSide/doclogo.png' align='absmiddle' border='0'>&nbsp;" + myArray[kk].name + "</nobr></a><br>")
                }
            }	
        }
        
        function changeFolder($1){
            if (document.all){
                currentFolder = eval("document.all." + $1 + "Folder")
                currentTree = eval("document.all." + $1 + "Tree")
                currentDiv = eval("document.all." + $1 + "Div")
            }
            if (!document.all && document.getElementById){
                currentFolder = eval("document.getElementById('" + $1 + "Folder" + "')")
                currentTree = eval("document.getElementById('" + $1 + "Tree" + "')")
                currentDiv = eval("document.getElementById('" + $1 + "Div" + "')")		
            }
            
           var cfArr = currentFolder.src.split("/")
           var fiArr0 = folderImgArray[0].src.split("/")
           var fiArr1 = folderImgArray[1].src.split("/")
           
           var ctArr = currentTree.src.split("/")
           var tiArr0 = treeImgArray[0].src.split("/")
           var tiArr1 = treeImgArray[1].src.split("/")
           var tiArr2 = treeImgArray[2].src.split("/")
           var tiArr3 = treeImgArray[3].src.split("/")
                    
            if (cfArr[(cfArr.length-1)]==fiArr0[(fiArr0.length-1)]){	
                currentFolder.src = folderImgArray[1].src;
                if (ctArr[(ctArr.length-1)]==tiArr0[(tiArr0.length-1)]){
                    currentTree.src = treeImgArray[1].src;			
                }		
                if (ctArr[(ctArr.length-1)]==tiArr2[(tiArr2.length-1)]){
                    currentTree.src = treeImgArray[3].src;
                }
                currentDiv.style.display=''
            }	
        
            if (cfArr[(cfArr.length-1)]==fiArr1[(fiArr1.length-1)]){
                currentFolder.src = folderImgArray[0].src;
                if (ctArr[(ctArr.length-1)]==tiArr1[(tiArr1.length-1)]){
                    currentTree.src = treeImgArray[0].src;			
                }		
                if (ctArr[(ctArr.length-1)]==tiArr3[(tiArr3.length-1)]){
                    currentTree.src = treeImgArray[2].src;
                }		
                currentDiv.style.display='none'
            }
        }
        
        function changeColor(aName){
        if (aName != currentA){
            if (aName == 'm0'){		
                document.getElementById(aName).style.color='black'
            }
            else{
                document.getElementById(aName).style.color='green'
                
            }
        if (currentA != 'm0'){
            document.getElementById(currentA).style.color='#9F8BFC'
        }
                currentA = aName
                //alert(currentA)	
        }
        }
        
        function writeTree(){
var ii
document.write("<BR><a href='right.htm' style=color:black;font-size:16px; Target='right' name = 'm0' ID='m0' OnClick='this.blur(); changeColor(this.name);'><img src='LeftSide/Logo.gif' align='absmiddle' border='0'>&nbsp;" + root + "</nobr></a><br>")

	for (ii=0;ii<dir.length;ii++){
		if (ii==dir.length-1){
		document.write("<div><a style=font-size:14px;color:#000; href='#' onClick='this.blur(); ")
		document.write('changeFolder("m' + ii + '"); return false')
		document.write("'><nobr><img name='m" + ii + "Tree' id='m" + ii + "Tree' src='LeftSide/Lplus.gif' align='top' border='0'><img name='m" + ii + "Folder' id='m" + ii + "Folder' src='LeftSide/folder.gif' align='top' border='0'>&nbsp;<b>" + dir[ii] + "</b></nobr></a></div>")
		document.write("<div Name='m" + ii + "Div' ID='m" + ii + "Div' style=display:none;>")
		writeLastSecondLevel(eval("dir"+ii),ii)
		}
	else{
		document.write("<div><a style=font-size:14px;color:#000; href='#' onClick='this.blur(); ")
		document.write('changeFolder("m' + ii + '"); return false')
		document.write("'><nobr><img name='m" + ii + "Tree'  id='m" + ii + "Tree' src='LeftSide/Tplus.gif' align='top' border='0'><img name='m" + ii + "Folder' id='m" + ii + "Folder' src='LeftSide/folder.gif' align='top' border='0'>&nbsp;" + dir[ii] + "</nobr></a></div>")
		document.write("<div Name='m" + ii + "Div' ID='m" + ii + "Div' style=display:none;>")
		writeSecondLevel(eval("dir"+ii),ii)
		}
	document.write("</div>")	
	}
	
}
        
        precasheLeftSide()
        writeTree()
        // -->
        </Script>


		<!-- End of Categories Box -->


	</div>

	<!-- End of Left Sidebar -->

	<!-- Start of Page Menu -->

  <div id="page_menu">
		<ul>
            <li><a href="index.php">Home</a></li> 
            <li>
                <a href="sop.php">SOP</a>
                <ul>
                    <?php
						if (isset($_SESSION['user_name'])) 
							echo "<li><a href=\"input-sop.php\">Input SOP</a>";
					?>
                </ul>
            </li>
            <li>
                <a href="accident.php">Accident</a>
                <ul>
                    <?php
						if (isset($_SESSION['user_name']))
							echo "<li><a href=\"input-accident.php\">Input Accident</a>";
					?>
                </ul>
            </li>
		</ul>
	</div>

	<!-- End of Page Menu -->

	<!-- Start of Main Content Area -->

<div id="main_content">

		<!-- Start of New Item Description -->

		<div id="new_item">

			<div id="new_item_header">
			<?php
				$id=$_REQUEST['id'];
				$id_mysql = mysql_connect("localhost",
												  "root",
												  "");
						
				if (! $id_mysql)
					die ("KONEKSI KE MYSQL GAGAL DIBENTUK");
					
				mysql_select_db("hse",$id_mysql) or
					die ("GAGAL MEMBUKA DATABASE. " . mysql_error());
					
				switch ($id) {
					case '1':
						printf("<h1>Environmental --> Energy Conservation</h1>
									<h1></h1>
									<h2> Overview</h2>
									</div>

									<div id=\"new_item_text\">
									<p>
									HSE is tasked with improving the Health and Safety performance of industry so as to reduce the incidence of work-related accidents and occupational ill-health within industry. This extends not only to employees, but also to members of the public whose health and safety may be affected by a work activity.
									</p>
									<p>
									When host country regulations differ from the levels and measures presented in the EHS Guidelines, projects are expected to achieve whichever is more stringent. If less stringent levels or measures are appropriate in view of specific project circumstances, a full and detailed justification for any proposed alternatives is needed as part of the site-specific environmental assessment. This justification should demonstrate that the choice for any alternate performance levels is protective of human health and the environment.
									</p>");
									
						$query = "SELECT document_name, category_name ".
							 "FROM sop ".
							 "WHERE category_name='Energy Conservation'";
							 
						$hasil = mysql_query($query, $id_mysql) or
							die ("GAGAL MELAKUKAN QUERY. " . mysql_error());

						$count = 0;
						
						printf("<p>&nbsp;</p>
								<h2> SOP Terkait </h2>
								<table width=\"606\" id=\"table-sop\">
								<tr>
									<th width=\"43\">No. </th>
									<th width=\"386\">Title</th>
									<th width=\"100\">Category</th>
									<th width=\"52\">Download</th>
								</tr>");
						
						while ($baris = mysql_fetch_row($hasil)) {
							$count=$count+1;
							$title = $baris[0];
							$kategori = $baris[1];
						
							printf("<TR><TD>%s</TD><TD>%s</TD><TD>%s</a></TD><TD><a href='./uploads/%s'>download<a></TD></TR>\n", $count, $title, $kategori, $title);
						}
						
						printf("</table>");
						
						$query = "SELECT location, date_log," .
							 "victim, category_name " .
							 "FROM log " .
							 "WHERE category_name='Energy Conservation'".
							 "ORDER BY date_log DESC";
							 
						$hasil = mysql_query($query, $id_mysql) or
							die ("GAGAL MELAKUKAN QUERY. " . mysql_error());
							
						printf("<p>&nbsp;</p>
								<h2> Accident Terkait </h2>
								<table width=\"607\" id=\"table-accident\">
								<tr>
									<th width=\"32\">No. </th>
									<th width=\"137\">Lokasi</th>
									<th width=\"109\">Tanggal</th>
									<th width=\"129\">Korban</th>
									<th width=\"166\">Kategori Kecelakaan</th>
								</tr>");
						
						$count = 0;
							
						while ($baris = mysql_fetch_row($hasil)) {
							$count=$count+1;
							$lokasi = $baris[0];
							$tanggal = $baris[1];
							$korban = $baris[2];
							$kateg = $baris[3];
						
							printf("<TR><TD>%s</TD><TD>%s</TD><TD><a href='./detil-accident.php?nama=%s&tanggal=%s'>%s</a></TD><TD>%s</TD><TD>%s</TD></TR>\n", $count, $lokasi, $korban, $tanggal, $tanggal, $korban, $kateg);
						}
						
						printf("</table><p>&nbsp;</p>");								
						
						mysql_close($id_mysql);
						break;
					case '2':
						printf("<h1>Environmental --> Noise Management</h1>
									<h1></h1>
									<h2> Overview</h2>
									</div>

									<div id=\"new_item_text\">
									<p>
									HSE is tasked with improving the Health and Safety performance of industry so as to reduce the incidence of work-related accidents and occupational ill-health within industry. This extends not only to employees, but also to members of the public whose health and safety may be affected by a work activity.
									</p>
									<p>
									When host country regulations differ from the levels and measures presented in the EHS Guidelines, projects are expected to achieve whichever is more stringent. If less stringent levels or measures are appropriate in view of specific project circumstances, a full and detailed justification for any proposed alternatives is needed as part of the site-specific environmental assessment. This justification should demonstrate that the choice for any alternate performance levels is protective of human health and the environment.
									</p>");
									
						$query = "SELECT document_name, category_name ".
							 "FROM sop ".
							 "WHERE category_name='Noise Management'";
							 
						$hasil = mysql_query($query, $id_mysql) or
							die ("GAGAL MELAKUKAN QUERY. " . mysql_error());

						$count = 0;
						
						printf("<p>&nbsp;</p>
								<h2> SOP Terkait </h2>
								<table width=\"606\" id=\"table-sop\">
								<tr>
									<th width=\"43\">No. </th>
									<th width=\"386\">Title</th>
									<th width=\"100\">Category</th>
									<th width=\"52\">Download</th>
								</tr>");
						
						while ($baris = mysql_fetch_row($hasil)) {
							$count=$count+1;
							$title = $baris[0];
							$kategori = $baris[1];
						
							printf("<TR><TD>%s</TD><TD>%s</TD><TD>%s</a></TD><TD><a href='./uploads/%s'>download<a></TD></TR>\n", $count, $title, $kategori, $title);
						}
						
						printf("</table>");
						
						$query = "SELECT location, date_log," .
							 "victim, category_name " .
							 "FROM log " .
							 "WHERE category_name='Noise Management'".
							 "ORDER BY date_log DESC";
							 
						$hasil = mysql_query($query, $id_mysql) or
							die ("GAGAL MELAKUKAN QUERY. " . mysql_error());
							
						printf("<p>&nbsp;</p>
								<h2> Accident Terkait </h2>
								<table width=\"607\" id=\"table-accident\">
								<tr>
									<th width=\"32\">No. </th>
									<th width=\"137\">Lokasi</th>
									<th width=\"109\">Tanggal</th>
									<th width=\"129\">Korban</th>
									<th width=\"166\">Kategori Kecelakaan</th>
								</tr>");
						
						$count = 0;
							
						while ($baris = mysql_fetch_row($hasil)) {
							$count=$count+1;
							$lokasi = $baris[0];
							$tanggal = $baris[1];
							$korban = $baris[2];
							$kateg = $baris[3];
						
							printf("<TR><TD>%s</TD><TD>%s</TD><TD><a href='./detil-accident.php?nama=%s&tanggal=%s'>%s</a></TD><TD>%s</TD><TD>%s</TD></TR>\n", $count, $lokasi, $korban, $tanggal, $tanggal, $korban, $kateg);
						}
						
						printf("</table><p>&nbsp;</p>");								
						
						mysql_close($id_mysql);
						break;
					case '3':
						printf("<h1>Environmental --> Water Conservation</h1>
									<h1></h1>
									<h2> Overview</h2>
									</div>

									<div id=\"new_item_text\">
									<p>
									HSE is tasked with improving the Health and Safety performance of industry so as to reduce the incidence of work-related accidents and occupational ill-health within industry. This extends not only to employees, but also to members of the public whose health and safety may be affected by a work activity.
									</p>
									<p>
									When host country regulations differ from the levels and measures presented in the EHS Guidelines, projects are expected to achieve whichever is more stringent. If less stringent levels or measures are appropriate in view of specific project circumstances, a full and detailed justification for any proposed alternatives is needed as part of the site-specific environmental assessment. This justification should demonstrate that the choice for any alternate performance levels is protective of human health and the environment.
									</p>");
									
						$query = "SELECT document_name, category_name ".
							 "FROM sop ".
							 "WHERE category_name='Water Conservation'";
							 
						$hasil = mysql_query($query, $id_mysql) or
							die ("GAGAL MELAKUKAN QUERY. " . mysql_error());

						$count = 0;
						
						printf("<p>&nbsp;</p>
								<h2> SOP Terkait </h2>
								<table width=\"606\" id=\"table-sop\">
								<tr>
									<th width=\"43\">No. </th>
									<th width=\"386\">Title</th>
									<th width=\"100\">Category</th>
									<th width=\"52\">Download</th>
								</tr>");
						
						while ($baris = mysql_fetch_row($hasil)) {
							$count=$count+1;
							$title = $baris[0];
							$kategori = $baris[1];
						
							printf("<TR><TD>%s</TD><TD>%s</TD><TD>%s</a></TD><TD><a href='./uploads/%s'>download<a></TD></TR>\n", $count, $title, $kategori, $title);
						}
						
						printf("</table>");
						
						$query = "SELECT location, date_log," .
							 "victim, category_name " .
							 "FROM log " .
							 "WHERE category_name='Water Conservation'".
							 "ORDER BY date_log DESC";
							 
						$hasil = mysql_query($query, $id_mysql) or
							die ("GAGAL MELAKUKAN QUERY. " . mysql_error());
							
						printf("<p>&nbsp;</p>
								<h2> Accident Terkait </h2>
								<table width=\"607\" id=\"table-accident\">
								<tr>
									<th width=\"32\">No. </th>
									<th width=\"137\">Lokasi</th>
									<th width=\"109\">Tanggal</th>
									<th width=\"129\">Korban</th>
									<th width=\"166\">Kategori Kecelakaan</th>
								</tr>");
						
						$count = 0;
							
						while ($baris = mysql_fetch_row($hasil)) {
							$count=$count+1;
							$lokasi = $baris[0];
							$tanggal = $baris[1];
							$korban = $baris[2];
							$kateg = $baris[3];
						
							printf("<TR><TD>%s</TD><TD>%s</TD><TD><a href='./detil-accident.php?nama=%s&tanggal=%s'>%s</a></TD><TD>%s</TD><TD>%s</TD></TR>\n", $count, $lokasi, $korban, $tanggal, $tanggal, $korban, $kateg);
						}
						
						printf("</table><p>&nbsp;</p>");								
						
						mysql_close($id_mysql);
						break;
					case '4':
						printf("<h1>Environmental --> Contaminated Land</h1>
									<h1></h1>
									<h2> Overview</h2>
									</div>

									<div id=\"new_item_text\">
									<p>
									HSE is tasked with improving the Health and Safety performance of industry so as to reduce the incidence of work-related accidents and occupational ill-health within industry. This extends not only to employees, but also to members of the public whose health and safety may be affected by a work activity.
									</p>
									<p>
									When host country regulations differ from the levels and measures presented in the EHS Guidelines, projects are expected to achieve whichever is more stringent. If less stringent levels or measures are appropriate in view of specific project circumstances, a full and detailed justification for any proposed alternatives is needed as part of the site-specific environmental assessment. This justification should demonstrate that the choice for any alternate performance levels is protective of human health and the environment.
									</p>");
									
						$query = "SELECT document_name, category_name ".
							 "FROM sop ".
							 "WHERE category_name='Contaminated Land'";
							 
						$hasil = mysql_query($query, $id_mysql) or
							die ("GAGAL MELAKUKAN QUERY. " . mysql_error());

						$count = 0;
						
						printf("<p>&nbsp;</p>
								<h2> SOP Terkait </h2>
								<table width=\"606\" id=\"table-sop\">
								<tr>
									<th width=\"43\">No. </th>
									<th width=\"386\">Title</th>
									<th width=\"100\">Category</th>
									<th width=\"52\">Download</th>
								</tr>");
						
						while ($baris = mysql_fetch_row($hasil)) {
							$count=$count+1;
							$title = $baris[0];
							$kategori = $baris[1];
						
							printf("<TR><TD>%s</TD><TD>%s</TD><TD>%s</a></TD><TD><a href='./uploads/%s'>download<a></TD></TR>\n", $count, $title, $kategori, $title);
						}
						
						printf("</table>");
						
						$query = "SELECT location, date_log," .
							 "victim, category_name " .
							 "FROM log " .
							 "WHERE category_name='Contaminated Land'".
							 "ORDER BY date_log DESC";
							 
						$hasil = mysql_query($query, $id_mysql) or
							die ("GAGAL MELAKUKAN QUERY. " . mysql_error());
							
						printf("<p>&nbsp;</p>
								<h2> Accident Terkait </h2>
								<table width=\"607\" id=\"table-accident\">
								<tr>
									<th width=\"32\">No. </th>
									<th width=\"137\">Lokasi</th>
									<th width=\"109\">Tanggal</th>
									<th width=\"129\">Korban</th>
									<th width=\"166\">Kategori Kecelakaan</th>
								</tr>");
						
						$count = 0;
							
						while ($baris = mysql_fetch_row($hasil)) {
							$count=$count+1;
							$lokasi = $baris[0];
							$tanggal = $baris[1];
							$korban = $baris[2];
							$kateg = $baris[3];
						
							printf("<TR><TD>%s</TD><TD>%s</TD><TD><a href='./detil-accident.php?nama=%s&tanggal=%s'>%s</a></TD><TD>%s</TD><TD>%s</TD></TR>\n", $count, $lokasi, $korban, $tanggal, $tanggal, $korban, $kateg);
						}
						
						printf("</table><p>&nbsp;</p>");								
						
						mysql_close($id_mysql);
						break;
					case '5':
					printf("<h1>Community Health and Safety --> Water Quality and Availability</h1>
									<h1></h1>
									<h2> Overview</h2>
									</div>

									<div id=\"new_item_text\">
									<p>
									HSE is tasked with improving the Health and Safety performance of industry so as to reduce the incidence of work-related accidents and occupational ill-health within industry. This extends not only to employees, but also to members of the public whose health and safety may be affected by a work activity.
									</p>
									<p>
									When host country regulations differ from the levels and measures presented in the EHS Guidelines, projects are expected to achieve whichever is more stringent. If less stringent levels or measures are appropriate in view of specific project circumstances, a full and detailed justification for any proposed alternatives is needed as part of the site-specific environmental assessment. This justification should demonstrate that the choice for any alternate performance levels is protective of human health and the environment.
									</p>");
									
						$query = "SELECT document_name, category_name ".
							 "FROM sop ".
							 "WHERE category_name='Water Quality and Availability'";
							 
						$hasil = mysql_query($query, $id_mysql) or
							die ("GAGAL MELAKUKAN QUERY. " . mysql_error());

						$count = 0;
						
						printf("<p>&nbsp;</p>
								<h2> SOP Terkait </h2>
								<table width=\"606\" id=\"table-sop\">
								<tr>
									<th width=\"43\">No. </th>
									<th width=\"386\">Title</th>
									<th width=\"100\">Category</th>
									<th width=\"52\">Download</th>
								</tr>");
						
						while ($baris = mysql_fetch_row($hasil)) {
							$count=$count+1;
							$title = $baris[0];
							$kategori = $baris[1];
						
							printf("<TR><TD>%s</TD><TD>%s</TD><TD>%s</a></TD><TD><a href='./uploads/%s'>download<a></TD></TR>\n", $count, $title, $kategori, $title);
						}
						
						printf("</table>");
						
						$query = "SELECT location, date_log," .
							 "victim, category_name " .
							 "FROM log " .
							 "WHERE category_name='Water Quality and Availability'".
							 "ORDER BY date_log DESC";
							 
						$hasil = mysql_query($query, $id_mysql) or
							die ("GAGAL MELAKUKAN QUERY. " . mysql_error());
							
						printf("<p>&nbsp;</p>
								<h2> Accident Terkait </h2>
								<table width=\"607\" id=\"table-accident\">
								<tr>
									<th width=\"32\">No. </th>
									<th width=\"137\">Lokasi</th>
									<th width=\"109\">Tanggal</th>
									<th width=\"129\">Korban</th>
									<th width=\"166\">Kategori Kecelakaan</th>
								</tr>");
						
						$count = 0;
							
						while ($baris = mysql_fetch_row($hasil)) {
							$count=$count+1;
							$lokasi = $baris[0];
							$tanggal = $baris[1];
							$korban = $baris[2];
							$kateg = $baris[3];
						
							printf("<TR><TD>%s</TD><TD>%s</TD><TD><a href='./detil-accident.php?nama=%s&tanggal=%s'>%s</a></TD><TD>%s</TD><TD>%s</TD></TR>\n", $count, $lokasi, $korban, $tanggal, $tanggal, $korban, $kateg);
						}
						
						printf("</table><p>&nbsp;</p>");								
						
						mysql_close($id_mysql);
						break;
					case '6':
						printf("<h1>Community Health and Safety --> Structural safety</h1>
									<h1></h1>
									<h2> Overview</h2>
									</div>

									<div id=\"new_item_text\">
									<p>
									HSE is tasked with improving the Health and Safety performance of industry so as to reduce the incidence of work-related accidents and occupational ill-health within industry. This extends not only to employees, but also to members of the public whose health and safety may be affected by a work activity.
									</p>
									<p>
									When host country regulations differ from the levels and measures presented in the EHS Guidelines, projects are expected to achieve whichever is more stringent. If less stringent levels or measures are appropriate in view of specific project circumstances, a full and detailed justification for any proposed alternatives is needed as part of the site-specific environmental assessment. This justification should demonstrate that the choice for any alternate performance levels is protective of human health and the environment.
									</p>");
									
						$query = "SELECT document_name, category_name ".
							 "FROM sop ".
							 "WHERE category_name='Structural safety'";
							 
						$hasil = mysql_query($query, $id_mysql) or
							die ("GAGAL MELAKUKAN QUERY. " . mysql_error());

						$count = 0;
						
						printf("<p>&nbsp;</p>
								<h2> SOP Terkait </h2>
								<table width=\"606\" id=\"table-sop\">
								<tr>
									<th width=\"43\">No. </th>
									<th width=\"386\">Title</th>
									<th width=\"100\">Category</th>
									<th width=\"52\">Download</th>
								</tr>");
						
						while ($baris = mysql_fetch_row($hasil)) {
							$count=$count+1;
							$title = $baris[0];
							$kategori = $baris[1];
						
							printf("<TR><TD>%s</TD><TD>%s</TD><TD>%s</a></TD><TD><a href='./uploads/%s'>download<a></TD></TR>\n", $count, $title, $kategori, $title);
						}
						
						printf("</table>");
						
						$query = "SELECT location, date_log," .
							 "victim, category_name " .
							 "FROM log " .
							 "WHERE category_name='Structural safety'".
							 "ORDER BY date_log DESC";
							 
						$hasil = mysql_query($query, $id_mysql) or
							die ("GAGAL MELAKUKAN QUERY. " . mysql_error());
							
						printf("<p>&nbsp;</p>
								<h2> Accident Terkait </h2>
								<table width=\"607\" id=\"table-accident\">
								<tr>
									<th width=\"32\">No. </th>
									<th width=\"137\">Lokasi</th>
									<th width=\"109\">Tanggal</th>
									<th width=\"129\">Korban</th>
									<th width=\"166\">Kategori Kecelakaan</th>
								</tr>");
						
						$count = 0;
							
						while ($baris = mysql_fetch_row($hasil)) {
							$count=$count+1;
							$lokasi = $baris[0];
							$tanggal = $baris[1];
							$korban = $baris[2];
							$kateg = $baris[3];
						
							printf("<TR><TD>%s</TD><TD>%s</TD><TD><a href='./detil-accident.php?nama=%s&tanggal=%s'>%s</a></TD><TD>%s</TD><TD>%s</TD></TR>\n", $count, $lokasi, $korban, $tanggal, $tanggal, $korban, $kateg);
						}
						
						printf("</table><p>&nbsp;</p>");								
						
						mysql_close($id_mysql);
						break;
					case '7':
						printf("<h1>Community Health and Safety --> Life and Fire Safety</h1>
									<h1></h1>
									<h2> Overview</h2>
									</div>

									<div id=\"new_item_text\">
									<p>
									HSE is tasked with improving the Health and Safety performance of industry so as to reduce the incidence of work-related accidents and occupational ill-health within industry. This extends not only to employees, but also to members of the public whose health and safety may be affected by a work activity.
									</p>
									<p>
									When host country regulations differ from the levels and measures presented in the EHS Guidelines, projects are expected to achieve whichever is more stringent. If less stringent levels or measures are appropriate in view of specific project circumstances, a full and detailed justification for any proposed alternatives is needed as part of the site-specific environmental assessment. This justification should demonstrate that the choice for any alternate performance levels is protective of human health and the environment.
									</p>");
									
						$query = "SELECT document_name, category_name ".
							 "FROM sop ".
							 "WHERE category_name='Life and Fire Safety'";
							 
						$hasil = mysql_query($query, $id_mysql) or
							die ("GAGAL MELAKUKAN QUERY. " . mysql_error());

						$count = 0;
						
						printf("<p>&nbsp;</p>
								<h2> SOP Terkait </h2>
								<table width=\"606\" id=\"table-sop\">
								<tr>
									<th width=\"43\">No. </th>
									<th width=\"386\">Title</th>
									<th width=\"100\">Category</th>
									<th width=\"52\">Download</th>
								</tr>");
						
						while ($baris = mysql_fetch_row($hasil)) {
							$count=$count+1;
							$title = $baris[0];
							$kategori = $baris[1];
						
							printf("<TR><TD>%s</TD><TD>%s</TD><TD>%s</a></TD><TD><a href='./uploads/%s'>download<a></TD></TR>\n", $count, $title, $kategori, $title);
						}
						
						printf("</table>");
						
						$query = "SELECT location, date_log," .
							 "victim, category_name " .
							 "FROM log " .
							 "WHERE category_name='Life and Fire Safety'".
							 "ORDER BY date_log DESC";
							 
						$hasil = mysql_query($query, $id_mysql) or
							die ("GAGAL MELAKUKAN QUERY. " . mysql_error());
							
						printf("<p>&nbsp;</p>
								<h2> Accident Terkait </h2>
								<table width=\"607\" id=\"table-accident\">
								<tr>
									<th width=\"32\">No. </th>
									<th width=\"137\">Lokasi</th>
									<th width=\"109\">Tanggal</th>
									<th width=\"129\">Korban</th>
									<th width=\"166\">Kategori Kecelakaan</th>
								</tr>");
						
						$count = 0;
							
						while ($baris = mysql_fetch_row($hasil)) {
							$count=$count+1;
							$lokasi = $baris[0];
							$tanggal = $baris[1];
							$korban = $baris[2];
							$kateg = $baris[3];
						
							printf("<TR><TD>%s</TD><TD>%s</TD><TD><a href='./detil-accident.php?nama=%s&tanggal=%s'>%s</a></TD><TD>%s</TD><TD>%s</TD></TR>\n", $count, $lokasi, $korban, $tanggal, $tanggal, $korban, $kateg);
						}
						
						printf("</table><p>&nbsp;</p>");								
						
						mysql_close($id_mysql);
						break;
					case '8':
						printf("<h1>Community Health and Safety --> Traffic Safety</h1>
									<h1></h1>
									<h2> Overview</h2>
									</div>

									<div id=\"new_item_text\">
									<p>
									HSE is tasked with improving the Health and Safety performance of industry so as to reduce the incidence of work-related accidents and occupational ill-health within industry. This extends not only to employees, but also to members of the public whose health and safety may be affected by a work activity.
									</p>
									<p>
									When host country regulations differ from the levels and measures presented in the EHS Guidelines, projects are expected to achieve whichever is more stringent. If less stringent levels or measures are appropriate in view of specific project circumstances, a full and detailed justification for any proposed alternatives is needed as part of the site-specific environmental assessment. This justification should demonstrate that the choice for any alternate performance levels is protective of human health and the environment.
									</p>");
									
						$query = "SELECT document_name, category_name ".
							 "FROM sop ".
							 "WHERE category_name='Traffic Safety'";
							 
						$hasil = mysql_query($query, $id_mysql) or
							die ("GAGAL MELAKUKAN QUERY. " . mysql_error());

						$count = 0;
						
						printf("<p>&nbsp;</p>
								<h2> SOP Terkait </h2>
								<table width=\"606\" id=\"table-sop\">
								<tr>
									<th width=\"43\">No. </th>
									<th width=\"386\">Title</th>
									<th width=\"100\">Category</th>
									<th width=\"52\">Download</th>
								</tr>");
						
						while ($baris = mysql_fetch_row($hasil)) {
							$count=$count+1;
							$title = $baris[0];
							$kategori = $baris[1];
						
							printf("<TR><TD>%s</TD><TD>%s</TD><TD>%s</a></TD><TD><a href='./uploads/%s'>download<a></TD></TR>\n", $count, $title, $kategori, $title);
						}
						
						printf("</table>");
						
						$query = "SELECT location, date_log," .
							 "victim, category_name " .
							 "FROM log " .
							 "WHERE category_name='Traffic Safety'".
							 "ORDER BY date_log DESC";
							 
						$hasil = mysql_query($query, $id_mysql) or
							die ("GAGAL MELAKUKAN QUERY. " . mysql_error());
							
						printf("<p>&nbsp;</p>
								<h2> Accident Terkait </h2>
								<table width=\"607\" id=\"table-accident\">
								<tr>
									<th width=\"32\">No. </th>
									<th width=\"137\">Lokasi</th>
									<th width=\"109\">Tanggal</th>
									<th width=\"129\">Korban</th>
									<th width=\"166\">Kategori Kecelakaan</th>
								</tr>");
						
						$count = 0;
							
						while ($baris = mysql_fetch_row($hasil)) {
							$count=$count+1;
							$lokasi = $baris[0];
							$tanggal = $baris[1];
							$korban = $baris[2];
							$kateg = $baris[3];
						
							printf("<TR><TD>%s</TD><TD>%s</TD><TD><a href='./detil-accident.php?nama=%s&tanggal=%s'>%s</a></TD><TD>%s</TD><TD>%s</TD></TR>\n", $count, $lokasi, $korban, $tanggal, $tanggal, $korban, $kateg);
						}
						
						printf("</table><p>&nbsp;</p>");								
						
						mysql_close($id_mysql);
						break;
					case '9':
						printf("<h1>Community Health and Safety --> Disease Prevention</h1>
									<h1></h1>
									<h2> Overview</h2>
									</div>

									<div id=\"new_item_text\">
									<p>
									HSE is tasked with improving the Health and Safety performance of industry so as to reduce the incidence of work-related accidents and occupational ill-health within industry. This extends not only to employees, but also to members of the public whose health and safety may be affected by a work activity.
									</p>
									<p>
									When host country regulations differ from the levels and measures presented in the EHS Guidelines, projects are expected to achieve whichever is more stringent. If less stringent levels or measures are appropriate in view of specific project circumstances, a full and detailed justification for any proposed alternatives is needed as part of the site-specific environmental assessment. This justification should demonstrate that the choice for any alternate performance levels is protective of human health and the environment.
									</p>");
									
						$query = "SELECT document_name, category_name ".
							 "FROM sop ".
							 "WHERE category_name='Disease Prevention'";
							 
						$hasil = mysql_query($query, $id_mysql) or
							die ("GAGAL MELAKUKAN QUERY. " . mysql_error());

						$count = 0;
						
						printf("<p>&nbsp;</p>
								<h2> SOP Terkait </h2>
								<table width=\"606\" id=\"table-sop\">
								<tr>
									<th width=\"43\">No. </th>
									<th width=\"386\">Title</th>
									<th width=\"100\">Category</th>
									<th width=\"52\">Download</th>
								</tr>");
						
						while ($baris = mysql_fetch_row($hasil)) {
							$count=$count+1;
							$title = $baris[0];
							$kategori = $baris[1];
						
							printf("<TR><TD>%s</TD><TD>%s</TD><TD>%s</a></TD><TD><a href='./uploads/%s'>download<a></TD></TR>\n", $count, $title, $kategori, $title);
						}
						
						printf("</table>");
						
						$query = "SELECT location, date_log," .
							 "victim, category_name " .
							 "FROM log " .
							 "WHERE category_name='Disease Prevention'".
							 "ORDER BY date_log DESC";
							 
						$hasil = mysql_query($query, $id_mysql) or
							die ("GAGAL MELAKUKAN QUERY. " . mysql_error());
							
						printf("<p>&nbsp;</p>
								<h2> Accident Terkait </h2>
								<table width=\"607\" id=\"table-accident\">
								<tr>
									<th width=\"32\">No. </th>
									<th width=\"137\">Lokasi</th>
									<th width=\"109\">Tanggal</th>
									<th width=\"129\">Korban</th>
									<th width=\"166\">Kategori Kecelakaan</th>
								</tr>");
						
						$count = 0;
							
						while ($baris = mysql_fetch_row($hasil)) {
							$count=$count+1;
							$lokasi = $baris[0];
							$tanggal = $baris[1];
							$korban = $baris[2];
							$kateg = $baris[3];
						
							printf("<TR><TD>%s</TD><TD>%s</TD><TD><a href='./detil-accident.php?nama=%s&tanggal=%s'>%s</a></TD><TD>%s</TD><TD>%s</TD></TR>\n", $count, $lokasi, $korban, $tanggal, $tanggal, $korban, $kateg);
						}
						
						printf("</table><p>&nbsp;</p>");								
						
						mysql_close($id_mysql);
						break;
					case '10':
						printf("<h1>Community Health and Safety --> Emergency Preparedness</h1>
									<h1></h1>
									<h2> Overview</h2>
									</div>

									<div id=\"new_item_text\">
									<p>
									HSE is tasked with improving the Health and Safety performance of industry so as to reduce the incidence of work-related accidents and occupational ill-health within industry. This extends not only to employees, but also to members of the public whose health and safety may be affected by a work activity.
									</p>
									<p>
									When host country regulations differ from the levels and measures presented in the EHS Guidelines, projects are expected to achieve whichever is more stringent. If less stringent levels or measures are appropriate in view of specific project circumstances, a full and detailed justification for any proposed alternatives is needed as part of the site-specific environmental assessment. This justification should demonstrate that the choice for any alternate performance levels is protective of human health and the environment.
									</p>");
									
						$query = "SELECT document_name, category_name ".
							 "FROM sop ".
							 "WHERE category_name='Emergency Preparedness'";
							 
						$hasil = mysql_query($query, $id_mysql) or
							die ("GAGAL MELAKUKAN QUERY. " . mysql_error());

						$count = 0;
						
						printf("<p>&nbsp;</p>
								<h2> SOP Terkait </h2>
								<table width=\"606\" id=\"table-sop\">
								<tr>
									<th width=\"43\">No. </th>
									<th width=\"386\">Title</th>
									<th width=\"100\">Category</th>
									<th width=\"52\">Download</th>
								</tr>");
						
						while ($baris = mysql_fetch_row($hasil)) {
							$count=$count+1;
							$title = $baris[0];
							$kategori = $baris[1];
						
							printf("<TR><TD>%s</TD><TD>%s</TD><TD>%s</a></TD><TD><a href='./uploads/%s'>download<a></TD></TR>\n", $count, $title, $kategori, $title);
						}
						
						printf("</table>");
						
						$query = "SELECT location, date_log," .
							 "victim, category_name " .
							 "FROM log " .
							 "WHERE category_name='Emergency Preparedness'".
							 "ORDER BY date_log DESC";
							 
						$hasil = mysql_query($query, $id_mysql) or
							die ("GAGAL MELAKUKAN QUERY. " . mysql_error());
							
						printf("<p>&nbsp;</p>
								<h2> Accident Terkait </h2>
								<table width=\"607\" id=\"table-accident\">
								<tr>
									<th width=\"32\">No. </th>
									<th width=\"137\">Lokasi</th>
									<th width=\"109\">Tanggal</th>
									<th width=\"129\">Korban</th>
									<th width=\"166\">Kategori Kecelakaan</th>
								</tr>");
						
						$count = 0;
							
						while ($baris = mysql_fetch_row($hasil)) {
							$count=$count+1;
							$lokasi = $baris[0];
							$tanggal = $baris[1];
							$korban = $baris[2];
							$kateg = $baris[3];
						
							printf("<TR><TD>%s</TD><TD>%s</TD><TD><a href='./detil-accident.php?nama=%s&tanggal=%s'>%s</a></TD><TD>%s</TD><TD>%s</TD></TR>\n", $count, $lokasi, $korban, $tanggal, $tanggal, $korban, $kateg);
						}
						
						printf("</table><p>&nbsp;</p>");								
						
						mysql_close($id_mysql);
						break;
					case '11':
						printf("<h1>Occupational Health and Safety --> General Facility Operation</h1>
									<h1></h1>
									<h2> Overview</h2>
									</div>

									<div id=\"new_item_text\">
									<p>
									HSE is tasked with improving the Health and Safety performance of industry so as to reduce the incidence of work-related accidents and occupational ill-health within industry. This extends not only to employees, but also to members of the public whose health and safety may be affected by a work activity.
									</p>
									<p>
									When host country regulations differ from the levels and measures presented in the EHS Guidelines, projects are expected to achieve whichever is more stringent. If less stringent levels or measures are appropriate in view of specific project circumstances, a full and detailed justification for any proposed alternatives is needed as part of the site-specific environmental assessment. This justification should demonstrate that the choice for any alternate performance levels is protective of human health and the environment.
									</p>");
									
						$query = "SELECT document_name, category_name ".
							 "FROM sop ".
							 "WHERE category_name='General Facility Operation'";
							 
						$hasil = mysql_query($query, $id_mysql) or
							die ("GAGAL MELAKUKAN QUERY. " . mysql_error());

						$count = 0;
						
						printf("<p>&nbsp;</p>
								<h2> SOP Terkait </h2>
								<table width=\"606\" id=\"table-sop\">
								<tr>
									<th width=\"43\">No. </th>
									<th width=\"386\">Title</th>
									<th width=\"100\">Category</th>
									<th width=\"52\">Download</th>
								</tr>");
						
						while ($baris = mysql_fetch_row($hasil)) {
							$count=$count+1;
							$title = $baris[0];
							$kategori = $baris[1];
						
							printf("<TR><TD>%s</TD><TD>%s</TD><TD>%s</a></TD><TD><a href='./uploads/%s'>download<a></TD></TR>\n", $count, $title, $kategori, $title);
						}
						
						printf("</table>");
						
						$query = "SELECT location, date_log," .
							 "victim, category_name " .
							 "FROM log " .
							 "WHERE category_name='General Facility Operation'".
							 "ORDER BY date_log DESC";
							 
						$hasil = mysql_query($query, $id_mysql) or
							die ("GAGAL MELAKUKAN QUERY. " . mysql_error());
							
						printf("<p>&nbsp;</p>
								<h2> Accident Terkait </h2>
								<table width=\"607\" id=\"table-accident\">
								<tr>
									<th width=\"32\">No. </th>
									<th width=\"137\">Lokasi</th>
									<th width=\"109\">Tanggal</th>
									<th width=\"129\">Korban</th>
									<th width=\"166\">Kategori Kecelakaan</th>
								</tr>");
						
						$count = 0;
							
						while ($baris = mysql_fetch_row($hasil)) {
							$count=$count+1;
							$lokasi = $baris[0];
							$tanggal = $baris[1];
							$korban = $baris[2];
							$kateg = $baris[3];
						
							printf("<TR><TD>%s</TD><TD>%s</TD><TD><a href='./detil-accident.php?nama=%s&tanggal=%s'>%s</a></TD><TD>%s</TD><TD>%s</TD></TR>\n", $count, $lokasi, $korban, $tanggal, $tanggal, $korban, $kateg);
						}
						
						printf("</table><p>&nbsp;</p>");								
						
						mysql_close($id_mysql);
						break;
					case '12':
						printf("<h1>Occupational Health and Safety --> Communication and Training</h1>
									<h1></h1>
									<h2> Overview</h2>
									</div>

									<div id=\"new_item_text\">
									<p>
									HSE is tasked with improving the Health and Safety performance of industry so as to reduce the incidence of work-related accidents and occupational ill-health within industry. This extends not only to employees, but also to members of the public whose health and safety may be affected by a work activity.
									</p>
									<p>
									When host country regulations differ from the levels and measures presented in the EHS Guidelines, projects are expected to achieve whichever is more stringent. If less stringent levels or measures are appropriate in view of specific project circumstances, a full and detailed justification for any proposed alternatives is needed as part of the site-specific environmental assessment. This justification should demonstrate that the choice for any alternate performance levels is protective of human health and the environment.
									</p>");
									
						$query = "SELECT document_name, category_name ".
							 "FROM sop ".
							 "WHERE category_name='Communication and Training'";
							 
						$hasil = mysql_query($query, $id_mysql) or
							die ("GAGAL MELAKUKAN QUERY. " . mysql_error());

						$count = 0;
						
						printf("<p>&nbsp;</p>
								<h2> SOP Terkait </h2>
								<table width=\"606\" id=\"table-sop\">
								<tr>
									<th width=\"43\">No. </th>
									<th width=\"386\">Title</th>
									<th width=\"100\">Category</th>
									<th width=\"52\">Download</th>
								</tr>");
						
						while ($baris = mysql_fetch_row($hasil)) {
							$count=$count+1;
							$title = $baris[0];
							$kategori = $baris[1];
						
							printf("<TR><TD>%s</TD><TD>%s</TD><TD>%s</a></TD><TD><a href='./uploads/%s'>download<a></TD></TR>\n", $count, $title, $kategori, $title);
						}
						
						printf("</table>");
						
						$query = "SELECT location, date_log," .
							 "victim, category_name " .
							 "FROM log " .
							 "WHERE category_name='Communication and Training'".
							 "ORDER BY date_log DESC";
							 
						$hasil = mysql_query($query, $id_mysql) or
							die ("GAGAL MELAKUKAN QUERY. " . mysql_error());
							
						printf("<p>&nbsp;</p>
								<h2> Accident Terkait </h2>
								<table width=\"607\" id=\"table-accident\">
								<tr>
									<th width=\"32\">No. </th>
									<th width=\"137\">Lokasi</th>
									<th width=\"109\">Tanggal</th>
									<th width=\"129\">Korban</th>
									<th width=\"166\">Kategori Kecelakaan</th>
								</tr>");
						
						$count = 0;
							
						while ($baris = mysql_fetch_row($hasil)) {
							$count=$count+1;
							$lokasi = $baris[0];
							$tanggal = $baris[1];
							$korban = $baris[2];
							$kateg = $baris[3];
						
							printf("<TR><TD>%s</TD><TD>%s</TD><TD><a href='./detil-accident.php?nama=%s&tanggal=%s'>%s</a></TD><TD>%s</TD><TD>%s</TD></TR>\n", $count, $lokasi, $korban, $tanggal, $tanggal, $korban, $kateg);
						}
						
						printf("</table><p>&nbsp;</p>");								
						
						mysql_close($id_mysql);
						break;
					case '13':
						printf("<h1>Occupational Health and Safety --> Personal Protective Equipment</h1>
									<h1></h1>
									<h2> Overview</h2>
									</div>

									<div id=\"new_item_text\">
									<p>
									HSE is tasked with improving the Health and Safety performance of industry so as to reduce the incidence of work-related accidents and occupational ill-health within industry. This extends not only to employees, but also to members of the public whose health and safety may be affected by a work activity.
									</p>
									<p>
									When host country regulations differ from the levels and measures presented in the EHS Guidelines, projects are expected to achieve whichever is more stringent. If less stringent levels or measures are appropriate in view of specific project circumstances, a full and detailed justification for any proposed alternatives is needed as part of the site-specific environmental assessment. This justification should demonstrate that the choice for any alternate performance levels is protective of human health and the environment.
									</p>");
									
						$query = "SELECT document_name, category_name ".
							 "FROM sop ".
							 "WHERE category_name='Personal Protective Equipment'";
							 
						$hasil = mysql_query($query, $id_mysql) or
							die ("GAGAL MELAKUKAN QUERY. " . mysql_error());

						$count = 0;
						
						printf("<p>&nbsp;</p>
								<h2> SOP Terkait </h2>
								<table width=\"606\" id=\"table-sop\">
								<tr>
									<th width=\"43\">No. </th>
									<th width=\"386\">Title</th>
									<th width=\"100\">Category</th>
									<th width=\"52\">Download</th>
								</tr>");
						
						while ($baris = mysql_fetch_row($hasil)) {
							$count=$count+1;
							$title = $baris[0];
							$kategori = $baris[1];
						
							printf("<TR><TD>%s</TD><TD>%s</TD><TD>%s</a></TD><TD><a href='./uploads/%s'>download<a></TD></TR>\n", $count, $title, $kategori, $title);
						}
						
						printf("</table>");
						
						$query = "SELECT location, date_log," .
							 "victim, category_name " .
							 "FROM log " .
							 "WHERE category_name='Personal Protective Equipment'".
							 "ORDER BY date_log DESC";
							 
						$hasil = mysql_query($query, $id_mysql) or
							die ("GAGAL MELAKUKAN QUERY. " . mysql_error());
							
						printf("<p>&nbsp;</p>
								<h2> Accident Terkait </h2>
								<table width=\"607\" id=\"table-accident\">
								<tr>
									<th width=\"32\">No. </th>
									<th width=\"137\">Lokasi</th>
									<th width=\"109\">Tanggal</th>
									<th width=\"129\">Korban</th>
									<th width=\"166\">Kategori Kecelakaan</th>
								</tr>");
						
						$count = 0;
							
						while ($baris = mysql_fetch_row($hasil)) {
							$count=$count+1;
							$lokasi = $baris[0];
							$tanggal = $baris[1];
							$korban = $baris[2];
							$kateg = $baris[3];
						
							printf("<TR><TD>%s</TD><TD>%s</TD><TD><a href='./detil-accident.php?nama=%s&tanggal=%s'>%s</a></TD><TD>%s</TD><TD>%s</TD></TR>\n", $count, $lokasi, $korban, $tanggal, $tanggal, $korban, $kateg);
						}
						
						printf("</table><p>&nbsp;</p>");								
						
						mysql_close($id_mysql);
						break;
					case '14':
						printf("<h1>Occupational Health and Safety --> Monitoring</h1>
									<h1></h1>
									<h2> Overview</h2>
									</div>

									<div id=\"new_item_text\">
									<p>
									HSE is tasked with improving the Health and Safety performance of industry so as to reduce the incidence of work-related accidents and occupational ill-health within industry. This extends not only to employees, but also to members of the public whose health and safety may be affected by a work activity.
									</p>
									<p>
									When host country regulations differ from the levels and measures presented in the EHS Guidelines, projects are expected to achieve whichever is more stringent. If less stringent levels or measures are appropriate in view of specific project circumstances, a full and detailed justification for any proposed alternatives is needed as part of the site-specific environmental assessment. This justification should demonstrate that the choice for any alternate performance levels is protective of human health and the environment.
									</p>");
									
						$query = "SELECT document_name, category_name ".
							 "FROM sop ".
							 "WHERE category_name='Monitoring'";
							 
						$hasil = mysql_query($query, $id_mysql) or
							die ("GAGAL MELAKUKAN QUERY. " . mysql_error());

						$count = 0;
						
						printf("<p>&nbsp;</p>
								<h2> SOP Terkait </h2>
								<table width=\"606\" id=\"table-sop\">
								<tr>
									<th width=\"43\">No. </th>
									<th width=\"386\">Title</th>
									<th width=\"100\">Category</th>
									<th width=\"52\">Download</th>
								</tr>");
						
						while ($baris = mysql_fetch_row($hasil)) {
							$count=$count+1;
							$title = $baris[0];
							$kategori = $baris[1];
						
							printf("<TR><TD>%s</TD><TD>%s</TD><TD>%s</a></TD><TD><a href='./uploads/%s'>download<a></TD></TR>\n", $count, $title, $kategori, $title);
						}
						
						printf("</table>");
						
						$query = "SELECT location, date_log," .
							 "victim, category_name " .
							 "FROM log " .
							 "WHERE category_name='Monitoring'".
							 "ORDER BY date_log DESC";
							 
						$hasil = mysql_query($query, $id_mysql) or
							die ("GAGAL MELAKUKAN QUERY. " . mysql_error());
							
						printf("<p>&nbsp;</p>
								<h2> Accident Terkait </h2>
								<table width=\"607\" id=\"table-accident\">
								<tr>
									<th width=\"32\">No. </th>
									<th width=\"137\">Lokasi</th>
									<th width=\"109\">Tanggal</th>
									<th width=\"129\">Korban</th>
									<th width=\"166\">Kategori Kecelakaan</th>
								</tr>");
						
						$count = 0;
							
						while ($baris = mysql_fetch_row($hasil)) {
							$count=$count+1;
							$lokasi = $baris[0];
							$tanggal = $baris[1];
							$korban = $baris[2];
							$kateg = $baris[3];
						
							printf("<TR><TD>%s</TD><TD>%s</TD><TD><a href='./detil-accident.php?nama=%s&tanggal=%s'>%s</a></TD><TD>%s</TD><TD>%s</TD></TR>\n", $count, $lokasi, $korban, $tanggal, $tanggal, $korban, $kateg);
						}
						
						printf("</table><p>&nbsp;</p>");								
						
						mysql_close($id_mysql);
						break;
				}
			?>
			</div>
            <div id="new_item_image">
			<!--<img src="images/hse-image.jpg"  alt="HSE picture" />-->
			</div>

			<div class="clearthis">&nbsp;</div>
		</div>

		<!-- End of New Item Description -->

		<!-- Start of Sub Item Descriptions -->

		<!-- End of Sub Item Descriptions -->

  </div>

	<!-- End of Main Content Area -->


	<div class="clearthis">&nbsp;</div>


	<!-- Start of Page Footer -->

	<div id="page_footer">


		<div id="powered_by">
		UPT KEAMANAN, KESEHATAN, KESELAMATAN KERJA DAN LINGKUNGAN
		</div>

		<div class="clearthis">&nbsp;</div>
	</div>

	<!-- End of Page Footer -->

</div>

</body>
</html>